package cn.edu.neusoft.demo.hospital2.Service.impl;

import cn.edu.neusoft.demo.hospital2.Dao.SpecialClinicDao;
import cn.edu.neusoft.demo.hospital2.pojo.SpecialClinic;
import cn.edu.neusoft.demo.hospital2.Service.SpecialClinicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SpecialClinicServiceImpl implements SpecialClinicService {

    @Autowired
    private SpecialClinicDao specialClinicDao;

    @Override
    public List<SpecialClinic> getAllSpecialClinics() {
        return specialClinicDao.getAllSpecialClinics();
    }

    @Override
    public List<SpecialClinic> getSpecialClinicsByDepartmentId(Integer departmentId) {
        return specialClinicDao.getSpecialClinicsByDepartmentId(departmentId);
    }

    @Override
    public SpecialClinic getSpecialClinicById(Integer clinicId) {
        return specialClinicDao.getSpecialClinicById(clinicId);
    }

    @Override
    public int insert(SpecialClinic clinic) {
        return specialClinicDao.insert(clinic);
    }

    @Override
    public int updateSpecialClinic(SpecialClinic clinic) {
        return specialClinicDao.updateSpecialClinic(clinic);
    }

    @Override
    public int deleteSpecialClinic(Integer clinicId) {
        return specialClinicDao.deleteById(clinicId);
    }
}